﻿#ifndef APIPROVIDER_H
#define APIPROVIDER_H

#include <QObject>
#include <QJsonArray>
#include <QJsonObject>
#include <QDir>

class ApiProvider : public QObject
{
    Q_OBJECT
public:
    explicit ApiProvider(QObject *parent = nullptr);

public slots:
    QJsonArray readListItem(QString name);
    void saveListItem(QString name,QJsonArray items);

    QJsonObject readAppConfig();
    void saveAppConfig(QJsonObject obj);

private:
    QDir m_configDir;
    QString m_appPath;
};

#endif
